<?php
//评论管理控制器

class CommentControl extends CommonControl{
	//查看评论
	public function index(){
		$db = M('comment');

		$page = new page($db->count(), 10, 4, 2);
		$this->assign('page',$page->show());

		$comment = $db->select($page->limit());
		$this->assign('comment',$comment);

		$this->display();
	}

	//删除
	public function del(){
		$coid = $this->_GET('coid','intval');
		M('comment')->where(array('coid'=>$coid))->delete();
		$this->success('删除成功！！！');
	}




}
?>